﻿<?xml version="1.0" encoding="utf-8" ?>
<c2eventsheet>
    <!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->
    <name>Main Events</name>
    <events>
        <variable constant="0" name="gScore" sid="104" static="0" type="number">0</variable>
        <event-block sid="7">
            <conditions>
                <condition id="-1" name="Every tick" sid="8" type="System" />
            </conditions>
            <actions>
                <action id="-8" name="Scroll to object" sid="9" type="System">
                    <param id="0" name="Object">Player</param>
                </action>
                <action id="0" name="Set text" sid="40" type="txtDiag">
                    <param id="0" name="Text">&quot;ViewPortTop=&quot; &amp; ViewportTop(&quot;Main&quot;)  &amp; &quot;ViewportBottom=&quot; &amp; ViewportBottom(&quot;Main&quot;)</param>
                </action>
                <action id="0" name="Set text" sid="42" type="txtDiag2">
                    <param id="0" name="Text">&quot;Player.X,Y=&quot; &amp; Player.X &amp; &quot;,&quot;&amp;  Player.Y</param>
                </action>
                <action id="0" name="Set text" sid="105" type="txtScore">
                    <param id="0" name="Text">&quot;Score: &quot; &amp; gScore</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="16">
            <conditions>
                <condition id="-8" name="Compare two values" sid="17" type="System">
                    <param id="0" name="First value">ViewportTop(&quot;Main&quot;)</param>
                    <param id="1" name="Comparison">4</param>
                    <param id="2" name="Second value">0</param>
                </condition>
                <condition id="-2" name="Compare Y" sid="18" type="Player">
                    <param id="0" name="Comparison">4</param>
                    <param id="1" name="Y co-ordinate">ViewportBottom(&quot;Main&quot;)</param>
                </condition>
            </conditions>
            <actions>
                <action id="-2" name="Set Y" sid="19" type="Player">
                    <param id="0" name="Y">ViewportBottom(&quot;Main&quot;)</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="22">
            <conditions>
                <condition id="-6" name="Every X seconds" sid="23" type="System">
                    <param id="0" name="Interval (seconds)">0.2</param>
                </condition>
            </conditions>
            <actions>
                <action id="0" name="Spawn another object" sid="24" type="Player">
                    <param id="0" name="Object">playerfire</param>
                    <param id="1" name="Layer">&quot;SFX&quot;</param>
                    <param id="2" name="Image point">1</param>
                </action>
                <action id="-8" name="Set angle" sid="27" type="playerfire">
                    <param id="0" name="Angle">270</param>
                </action>
                <action id="0" name="Spawn another object" sid="25" type="Player">
                    <param id="0" name="Object">playerfire</param>
                    <param id="1" name="Layer">&quot;SFX&quot;</param>
                    <param id="2" name="Image point">2</param>
                </action>
                <action id="-8" name="Set angle" sid="29" type="playerfire">
                    <param id="0" name="Angle">270</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="30">
            <conditions>
                <condition id="-6" name="Every X seconds" sid="31" type="System">
                    <param id="0" name="Interval (seconds)">1</param>
                </condition>
            </conditions>
            <actions>
                <action id="-3" name="Create object" sid="35" type="System">
                    <param id="0" name="Object to create">Enemy1</param>
                    <param id="1" name="Layer">&quot;Main&quot;</param>
                    <param id="2" name="X">random(LayoutWidth)</param>
                    <param id="3" name="Y">ViewportTop(&quot;Main&quot;)-50</param>
                </action>
                <action id="-8" name="Set angle" sid="36" type="Enemy1">
                    <param id="0" name="Angle">180</param>
                </action>
                <action behavior="Bullet" id="3" name="Set angle of motion" sid="44" type="Enemy1">
                    <param id="0" name="Angle">90</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="45">
            <conditions>
                <condition id="0" name="On collision with another object" sid="46" type="playerfire">
                    <param id="0" name="Object">Enemy1</param>
                </condition>
            </conditions>
            <actions>
                <action id="0" name="Spawn another object" sid="47" type="Enemy1">
                    <param id="0" name="Object">Explosion</param>
                    <param id="1" name="Layer">&quot;SFX&quot;</param>
                    <param id="2" name="Image point">0</param>
                </action>
                <action id="-9" name="Destroy" sid="53" type="Enemy1" />
                <action id="-10" name="Add to" sid="106" type="System">
                    <param id="0" name="Variable">gScore</param>
                    <param id="1" name="Value">10</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="98">
            <conditions>
                <condition id="0" name="On collision with another object" sid="99" type="playerfire">
                    <param id="0" name="Object">Enemy2</param>
                </condition>
            </conditions>
            <actions>
                <action id="0" name="Spawn another object" sid="100" type="Enemy2">
                    <param id="0" name="Object">Explosion</param>
                    <param id="1" name="Layer">&quot;SFX&quot;</param>
                    <param id="2" name="Image point">0</param>
                </action>
                <action id="-9" name="Destroy" sid="101" type="Enemy2" />
                <action id="-10" name="Add to" sid="107" type="System">
                    <param id="0" name="Variable">gScore</param>
                    <param id="1" name="Value">20</param>
                </action>
            </actions>
        </event-block>
        <event-block any="1" sid="55">
            <conditions>
                <condition id="0" name="On collision with another object" sid="56" type="Enemy1">
                    <param id="0" name="Object">Player</param>
                </condition>
                <condition id="0" name="On collision with another object" sid="82" type="Enemy2">
                    <param id="0" name="Object">Player</param>
                </condition>
                <condition id="0" name="On collision with another object" sid="94" type="enemyfire">
                    <param id="0" name="Object">Player</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Flash" id="0" name="Flash" sid="58" type="Player">
                    <param id="0" name="&apos;On&apos; time">0.1</param>
                    <param id="1" name="&apos;Off&apos; time">0.1</param>
                    <param id="2" name="Duration">1.0</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="73">
            <conditions>
                <condition id="-6" name="Every X seconds" sid="74" type="System">
                    <param id="0" name="Interval (seconds)">1</param>
                </condition>
            </conditions>
            <actions>
                <action id="-3" name="Create object" sid="75" type="System">
                    <param id="0" name="Object to create">Enemy2</param>
                    <param id="1" name="Layer">&quot;Main&quot;</param>
                    <param id="2" name="X">random(LayoutWidth)</param>
                    <param id="3" name="Y">ViewportTop(&quot;Main&quot;)-50</param>
                </action>
                <action behavior="Bullet" id="3" name="Set angle of motion" sid="76" type="Enemy2">
                    <param id="0" name="Angle">90</param>
                </action>
                <action id="-8" name="Set angle" sid="78" type="Enemy2">
                    <param id="0" name="Angle">180</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="79">
            <conditions>
                <condition id="-6" name="Every X seconds" sid="93" type="System">
                    <param id="0" name="Interval (seconds)">1.0</param>
                </condition>
            </conditions>
            <actions />
            <sub-events>
                <event-block sid="92">
                    <conditions>
                        <condition id="-3" name="Is on-screen" sid="80" type="Enemy2" />
                    </conditions>
                    <actions>
                        <action id="0" name="Spawn another object" sid="81" type="Enemy2">
                            <param id="0" name="Object">enemyfire</param>
                            <param id="1" name="Layer">&quot;SFX&quot;</param>
                            <param id="2" name="Image point">0</param>
                        </action>
                        <action id="-8" name="Set angle" sid="91" type="enemyfire">
                            <param id="0" name="Angle">90</param>
                        </action>
                    </actions>
                </event-block>
            </sub-events>
        </event-block>
    </events>
</c2eventsheet>
